************************************************************************************
*
* 	PROGRAM:		Create tables for EDCC
*
*	PROGRAMMER:		Natasha Ahuja 
*
*	WITH:			LORI BEAMAN, SYLVAN HERSKOWITZ, NIALL KELEHER & JEREMY MAGRUDER
*
*	DATE:			Jan 22, 2020
*
************************************************************************************
version 14.0

log close _all
clear all
mata: mata clear
cap log close
set more off
set trace off
set linesize 140
set memory 500m
set matsize 800
set scheme s2mono
set seed 123456789
set graphics off
timer clear
#delimit cr

* Set Main Folder path
global path "C:\Users\SHERSKOWITZ\Dropbox (IFPRI)/SfD Replication"

global inputdir "${path}\data"
global outputdir "${path}\output"

di "${path}"
cd "${path}"

// Install programs if not already installed 
	/*
	cap ssc install reghdfe
	cap ssc install ftools
	cap ssc install ivreg2
	cap net describe ivreghdfe, from(http://fmwww.bc.edu/RePEc/bocode/i)
	cap ssc install ranktest
	cap ssc install coefplot
	*/

run "code/01_balance.do"

run "code/02_maintables.do"

run "code/03_correlations.do"

run "code/04_psanalysis.do"

run "code/05_peers.do" 

//reminder to install ngreg from https://web.stanford.edu/~fafchamp/resources.html

run "code/06_shue.do" 


